package com.bridge.applets.strategy.factory;

import com.bridge.applets.strategy.handler.bridge.BridgeHandler;
import org.ehcache.impl.internal.concurrent.ConcurrentHashMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
public class BridgeFactory {


    @Autowired
     Map<String, BridgeHandler> handlerMap=new ConcurrentHashMap<>();

    public BridgeHandler getHandlerByType(String bridgeType){
        return handlerMap.get("bridge-type-"+bridgeType);
    }
}
